﻿class Node {
	private var _object:Object;
	private var _next:Node;
	private var _index:Number;
	
	public function Node(p_object:Object, p_index:Number) {
		this._object = p_object;
		this._next = null;
		this._index = p_index;
	}
	
	public function setObject(p_object:Object) {
		this._object = p_object;
	}
	
	public function getObject():Object {
		return this._object;
	}
	
	public function setNext(p_node:Node) {
		this._next = p_node;
	}
	
	public function getNext():Node {
		return this._next;
	}
	
	public function setIndex(p_index:Number) {
		this._index = p_index;
	}
	
	public function compareTo(p_node:Node):Boolean {
		var _returnValue = false;
		
		if (_object.getUniqueId() == p_node.getObject().getUniqueId()) {
			_returnValue = true;
		}
		
		return _returnValue;
	}
	
	public function getIndex():Number {
		return this._index;
	}
}